package com.cloudcc.mobile.adapter;

import android.content.Context;

import com.cloudcc.cloudframe.adapter.CommonAdapter;
import com.cloudcc.cloudframe.adapter.ViewHolder;
import com.cloudcc.cloudframe.util.StringUtils;
import com.cloudcc.mobile.R;
import com.cloudcc.mobile.entity.LeadEntity;

/**
 * 客户适配器
 * 
 * @author Administrator
 * 
 */
public class LeadAdapter extends CommonAdapter<LeadEntity> {

	public LeadAdapter(Context mContext) {
		super(mContext);
	}

	@Override
	public void convert(ViewHolder h, LeadEntity t) {
		h.setText(R.id.title, StringUtils.isBlank(t.getCompany()) ? t.getName()
				: t.getName() + " - " + t.getCompany());
	}

	@Override
	public int getLayoutId() {
		return R.layout.lead_list_item;
	}

}